<template>
  <div style="position:relative">
    <a-textarea v-model='values' style="position:absolute;top:0;left:0;width:500px;opacity:0"/>
    <Editor v-model="values" @edit='editDetail' :height="'200px'" :hideToolBar="true"></Editor>
  </div>
</template>
<script>
import Editor from '@/components/Editor/Editor'
export default {
  props: ['value', 'isReadOnlyPage', 'isDisabled'],
  components: {
    Editor
  },
  data () {
    return {
      richTextEditor: ''
    }
  },
  watch: {
    value (newValue) {
      this.values = newValue
      // this.richTextEditor = newValue
    }
    // values (newValue) {
    //   this.$emit('change', newValue)
    // }
  },
  methods: {
    editDetail (value, text) { // value:带标签样式的内容， text:去除标签样式的纯文本
      // this.form.setFieldsValue({ // 2013-09
      //   'detail': val
      // })
      this.values = value
      this.$emit('change', value)
      console.log(value)
    }
  }
}
</script>
<style>

</style>
